home *** CD-ROM | disk | FTP | other *** search
- unit Unit1;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls, ComCtrls, MultiDropFile;
-
- type
- TForm1 = class(TForm)
- MultiDropFile1: TMultiDropFile;
- ListBox1: TListBox;
- StatusBar1: TStatusBar;
- Panel1: TPanel;
- Image1: TImage;
- Label1: TLabel;
- procedure FormShow(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure MultiDropFile1FileDrop(Sender: TObject;
- numberOfFiles: Integer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormShow(Sender: TObject);
- begin
- MultiDropFile1.enableDropFile(form1.handle);
- end;
-
- procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- MultiDropFile1.disableDropFile;
- end;
-
- procedure TForm1.MultiDropFile1FileDrop(Sender: TObject;
- numberOfFiles: Integer);
- Var
- n: Integer;
- begin
- ListBox1.clear;
- statusBar1.simpleText:=intToStr(numberOfFiles) + ' files dropped';
- for n:=1 to numberOfFiles do
- begin
- listbox1.items.add(MultiDropFile1.FileName[n]);
- end;
- end;
-
- end.
-